#include <QCoreApplication>
#include <iostream>
#include <cmath>
using namespace std;

int main(int argc, char *argv[])
{
    int a,b,c,d;
    cout << "Enter A: ";
    cin >> a;
    b=(a/100);
    c=(a/10)%10;
    d=(a%10);
    bool z=(b!=c) && (b!=d) && (c!=d);
    cout << z;

    return 0;
}
